package cn.tedu.egweibo1.controller;

import cn.tedu.egweibo1.base.response.json;
import cn.tedu.egweibo1.pojo.dto.useradd;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import cn.tedu.egweibo1.mapper.mapper;

@RestController
@RequestMapping("/user")
public class controller
{
    @Autowired
    private mapper mapper;
@PostMapping("/add")
    public json add(@RequestBody useradd add)
{
    mapper.insert(add);
    return json.success();
}
}
